//
//  GuestCouponCommentViewController.m
//  penzer
//
//  Created by 还带大道 on 2018/11/10.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "GuestCouponCommentViewController.h"
#import "CouponCommentHV.h"
#import "CouponCommentFV.h"

@interface GuestCouponCommentViewController ()<UITableViewDelegate>
@property (nonatomic,weak) UITableView *tableView;
@property (nonatomic,strong) CouponCommentFV *footerV;

@end

@implementation GuestCouponCommentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setNavigation:YES andTitle:@"评价" andNaviColor:[UIColor whiteColor] andTitleColor:nil];
    [self setupTableView];
    
}


- (void)viewWillLayoutSubviews
{
    [super viewWillLayoutSubviews];
}


- (void)setupTableView
{
    UITableView *tableView = [[UITableView alloc] init];
    self.tableView = tableView;
    self.tableView.delegate = self;
    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.view addSubview:tableView];
    [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(kTopHeight);
        make.left.right.bottom.equalTo(self.view);
    }];
    
    
    CouponCommentHV *headerV = [CouponCommentHV shareView];
    headerV.backgroundColor = [UIColor orangeColor];
    headerV.height = 205;
    self.tableView.tableHeaderView = headerV;
    
    
    CouponCommentFV *footerV = [CouponCommentFV shareView];
    _footerV = footerV;
    footerV.refreshBlock = ^{
        self.tableView.tableFooterView = self.footerV;
    };
    
    footerV.completeBlock = ^{
        [self.navigationController popViewControllerAnimated:YES];
    };
    
    footerV.showPickerVc = self;
    footerV.backgroundColor = [UIColor whiteColor];
    self.tableView.tableFooterView = footerV;
    
}


- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    [self.view endEditing:YES];
}

@end
